.class final Lcom/melesta/engine/FacebookOperations$6;
.super Ljava/lang/Object;
.source "FacebookOperations.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/melesta/engine/FacebookOperations;->facebookSendRequest(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZII)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field final synthetic val$callback:I

.field final synthetic val$data:Ljava/lang/String;

.field final synthetic val$friends:Ljava/lang/String;

.field final synthetic val$is_suggestion:Z

.field final synthetic val$me:Lcom/melesta/engine/EngineActivity;

.field final synthetic val$message:Ljava/lang/String;

.field final synthetic val$user_data:I


# direct methods
.method constructor <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLcom/melesta/engine/EngineActivity;II)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 445
    iput-object p1, p0, Lcom/melesta/engine/FacebookOperations$6;->val$friends:Ljava/lang/String;

    iput-object p2, p0, Lcom/melesta/engine/FacebookOperations$6;->val$data:Ljava/lang/String;

    iput-object p3, p0, Lcom/melesta/engine/FacebookOperations$6;->val$message:Ljava/lang/String;

    iput-boolean p4, p0, Lcom/melesta/engine/FacebookOperations$6;->val$is_suggestion:Z

    iput-object p5, p0, Lcom/melesta/engine/FacebookOperations$6;->val$me:Lcom/melesta/engine/EngineActivity;

    iput p6, p0, Lcom/melesta/engine/FacebookOperations$6;->val$user_data:I

    iput p7, p0, Lcom/melesta/engine/FacebookOperations$6;->val$callback:I

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .prologue
    .line 449
    :try_start_0
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 450
    .local v1, parameters:Landroid/os/Bundle;
    iget-object v3, p0, Lcom/melesta/engine/FacebookOperations$6;->val$friends:Ljava/lang/String;

    invoke-static {v3}, Lcom/melesta/engine/FacebookOperations;->truncIdList(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    .line 452
    .local v2, suggestions:Ljava/lang/String;
    const-string v3, "data"

    iget-object v4, p0, Lcom/melesta/engine/FacebookOperations$6;->val$data:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 453
    const-string v3, "message"

    iget-object v4, p0, Lcom/melesta/engine/FacebookOperations$6;->val$message:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 454
    const-string v3, "link"

    sget-object v4, Lcom/melesta/engine/FacebookOperations;->mFacebookPageLink:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 455
    const-string v3, "name"

    sget-object v4, Lcom/melesta/engine/FacebookOperations;->mFacebookPageName:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 456
    const-string v3, "title"

    sget-object v4, Lcom/melesta/engine/FacebookOperations;->mFacebookPageName:Ljava/lang/String;

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 457
    if-eqz v2, :cond_0

    invoke-virtual {v2}, Ljava/lang/String;->length()I

    move-result v3

    if-lez v3, :cond_0

    .line 458
    const-string v3, "frictionless"

    const-string v4, "1"

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 459
    iget-boolean v3, p0, Lcom/melesta/engine/FacebookOperations$6;->val$is_suggestion:Z

    if-eqz v3, :cond_1

    .line 460
    const-string v3, "filters"

    new-instance v4, Ljava/lang/StringBuilder;

    invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V

    const-string v5, "[user_ids: ["

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    const-string v5, "]]"

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v3, v4}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 467
    :cond_0
    :goto_0
    iget-object v3, p0, Lcom/melesta/engine/FacebookOperations$6;->val$me:Lcom/melesta/engine/EngineActivity;

    new-instance v4, Lcom/melesta/engine/FacebookOperations$6$1;

    invoke-direct {v4, p0}, Lcom/melesta/engine/FacebookOperations$6$1;-><init>(Lcom/melesta/engine/FacebookOperations$6;)V

    invoke-static {v3, v1, v4}, Lcom/melesta/engine/Helpers;->showRequestDialogWithoutNotificationBar(Landroid/content/Context;Landroid/os/Bundle;Lcom/facebook/widget/WebDialog$OnCompleteListener;)V

    .line 489
    .end local v1           #parameters:Landroid/os/Bundle;
    .end local v2           #suggestions:Ljava/lang/String;
    :goto_1
    return-void

    .line 463
    .restart local v1       #parameters:Landroid/os/Bundle;
    .restart local v2       #suggestions:Ljava/lang/String;
    :cond_1
    const-string v3, "to"

    invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    .line 486
    .end local v1           #parameters:Landroid/os/Bundle;
    .end local v2           #suggestions:Ljava/lang/String;
    :catch_0
    move-exception v0

    .line 487
    .local v0, exc:Ljava/lang/Exception;
    const-string v3, "facebookSendRequest-handler"

    invoke-static {v3, v0}, Lcom/melesta/engine/Error;->processException(Ljava/lang/String;Ljava/lang/Exception;)V

    goto :goto_1
.end method
